package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BorrowMoneyenMapper;
import com.ruoyi.system.domain.BorrowMoneyen;
import com.ruoyi.system.service.IBorrowMoneyenService;

/**
 * 用户借款Service业务层处理
 *
 * @author ruoyi
 * @date 2021-05-07
 */
@Service
public class BorrowMoneyenServiceImpl implements IBorrowMoneyenService
{
    @Autowired
    private BorrowMoneyenMapper borrowMoneyenMapper;

    /**
     * 查询用户借款
     *
     * @param borrowId 用户借款ID
     * @return 用户借款
     */
    @Override
    public BorrowMoneyen selectBorrowMoneyenById(Long borrowId)
    {
        return borrowMoneyenMapper.selectBorrowMoneyenById(borrowId);
    }

    /**
     * 查询用户借款列表
     *
     * @param borrowMoneyen 用户借款
     * @return 用户借款
     */
    @Override
    public List<BorrowMoneyen> selectBorrowMoneyenList(BorrowMoneyen borrowMoneyen)
    {
        return borrowMoneyenMapper.selectBorrowMoneyenList(borrowMoneyen);
    }

    /**
     * 新增用户借款
     *
     * @param borrowMoneyen 用户借款
     * @return 结果
     */
    @Override
    public int insertBorrowMoneyen(BorrowMoneyen borrowMoneyen)
    {
        return borrowMoneyenMapper.insertBorrowMoneyen(borrowMoneyen);
    }

    /**
     * 修改用户借款
     *
     * @param borrowMoneyen 用户借款
     * @return 结果
     */
    @Override
    public int updateBorrowMoneyen(BorrowMoneyen borrowMoneyen)
    {
        return borrowMoneyenMapper.updateBorrowMoneyen(borrowMoneyen);
    }

    /**
     * 批量删除用户借款
     *
     * @param borrowIds 需要删除的用户借款ID
     * @return 结果
     */
    @Override
    public int deleteBorrowMoneyenByIds(Long[] borrowIds)
    {
        return borrowMoneyenMapper.deleteBorrowMoneyenByIds(borrowIds);
    }

    /**
     * 删除用户借款信息
     *
     * @param borrowId 用户借款ID
     * @return 结果
     */
    @Override
    public int deleteBorrowMoneyenById(Long borrowId)
    {
        return borrowMoneyenMapper.deleteBorrowMoneyenById(borrowId);
    }
}